using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Text;
using Microsoft.BizTalk.PipelineOM;
using IComponent = Microsoft.BizTalk.Component.Interop.IComponent;
using Microsoft.BizTalk.Component.Interop;
using System.Resources;
using System.Reflection;
using System.ComponentModel;

namespace eliasen.eu.BizTalk.PipelineComponents
{
    [ComponentCategory(CategoryTypes.CATID_PipelineComponent)]
    [ComponentCategory(CategoryTypes.CATID_Any)]
    [Guid("c24c25a7-7d73-47a9-91ee-261068da95cf")]   
    public class DevNull : IBaseComponent, IComponentUI, IComponent, IPersistPropertyBag, IAssemblerComponent, IDisassemblerComponent
    {
        private static ResourceManager rm;

        static DevNull()
        {
            rm = Util.GetResourceManager();
        }

        #region IBaseComponent Members

        [Browsable(false)]
        public string Description
        {
            get
            {
                return rm.GetString("DevNull_Description");
            }
        }

        [Browsable(false)]
        public string Name
        {
            get
            {
                return rm.GetString("DevNull_Name");
            }
        }

        [Browsable(false)]
        public string Version
        {
            get
            {
                return rm.GetString("DevNull_Version");
            }
        }

        #endregion

        #region IComponentUI Members

        [Browsable(false)]
        public IntPtr Icon
        {
            get
            {
                return new System.IntPtr();
                //return ((Bitmap) resourceManager.GetObject("CompIcon")).GetHicon();
            }
        }

        public System.Collections.IEnumerator Validate(object projectSystem)
        {
            return null;
        }

        #endregion

        #region IComponent Members

        public Microsoft.BizTalk.Message.Interop.IBaseMessage Execute(IPipelineContext pContext, Microsoft.BizTalk.Message.Interop.IBaseMessage pInMsg)
        {
            return null;
        }

        #endregion

        #region IPersistPropertyBag Members

        public void GetClassID(out Guid classID)
        {
            classID = new Guid("c24c25a7-7d73-47a9-91ee-261068da95cf");   
        }

        public void InitNew()
        {
            
        }

        public void Load(IPropertyBag propertyBag, int errorLog)
        {
        }

        public void Save(IPropertyBag propertyBag, bool clearDirty, bool saveAllProperties)
        {
        }

        #endregion

        #region IAssemblerComponent Members

        public void AddDocument(IPipelineContext pContext, Microsoft.BizTalk.Message.Interop.IBaseMessage pInMsg)
        {
        }

        public Microsoft.BizTalk.Message.Interop.IBaseMessage Assemble(IPipelineContext pContext)
        {
            return null;
        }

        #endregion

        #region IDisassemblerComponent Members

        public void Disassemble(IPipelineContext pContext, Microsoft.BizTalk.Message.Interop.IBaseMessage pInMsg)
        {
        }

        public Microsoft.BizTalk.Message.Interop.IBaseMessage GetNext(IPipelineContext pContext)
        {
            return null;
        }

        #endregion
    }
}
